<?php
namespace app\home\model;
use \think\Db;
class ActivityModel
{
    /**
     * 活动首页
     */
    public function activityList(){
        $activityList = Db::table('activity')->order('create_time desc')->select();
        return $activityList;
    }

    /**
     * 活动参与人数查询
     */
    public function getAddFind($id){
        $getAddFind = Db::table('activity')->where('id', $id)->find();
        return $getAddFind;
    }

    /**
     * 活动参与人数增加
     */
    public function getAddNum($id, $data){
        $getAddNum = Db::table('activity')->where('id', $id)->update($data);
        return $getAddNum;
    }
}